import { useState } from 'react'
function App() {
  const inputref = useRef(null)
  function showDown() {
    console.dir(inputref.current);
    console.log(inputref.current);
  }
  return (
    <>
      <input type="text" ref={inputref} />
      <button onClick={showDown}>获取dom元素</button>
    </>
  )
}

export default App